---
title: "SQL-VP-033: Check whether a policy belongs to a group/chapter (SQL Server)"
summary: Checks group/chapter membership for a policy via a SQL Server stored procedure — the primary Group authorization check.
status: draft
owner: SAIF Claims BOF team
last_reviewed: 2026-08-21
library: SAIF.Business.View.Policy
reference_type: embedded
---

# SQL-VP-033 Check whether a policy belongs to a group chapter (SQL Server)

Used by `clsPolicySecurity.IsInGroup()` (internally aliased `"IsInGroup"`) to enforce
[BR-VP-007](../business-rules.md#br-vp-007-group-membership-required). Executed against the
secondary SQL Server BDS `IDataPortalInfo` built by `clsPolicySecurity.Initialize()`.

## Classification

| Field | Value |
| --- | --- |
| **SQL ID** | SQL-VP-033 |
| **Operation type** | Read |
| **Execution method** | Stored procedure (via `SqlHelper`) |
| **Database** | SQL Server |
| **Schema** | `[unqualified]**` |
| **Command type** | StoredProcedure |
| **Business object** | `clsPolicySecurity` |
| **Criteria property** | `IsInGroup()` (ad hoc method) |
| **Lifecycle method** | ad hoc method |

## Parameters

| Parameter | Direction | Type | Max length | Description |
| --- | --- | --- | --- | --- |
| `@groupID` | Input | ID | N/A | Group ID for the current user. |
| `@Chapters` | Input | String/list | N/A | Chapter(s) associated with the group. |
| `@policyNum` | Input | Decimal | N/A | Policy number to check group membership for. |

## Tables

| Table | Access | Columns used |
| --- | --- | --- |
| *(not directly visible — encapsulated in procedure body)* | SELECT | N/A |

## Sample SQL

```sql
EXEC cp_policy_in_group
  @groupID   = :groupID,
  @Chapters  = :Chapters,
  @policyNum = :policyNum
```

## Business rules
- [BR-VP-007: Group membership required](../business-rules.md#br-vp-007-group-membership-required)

> **Note:** Statements marked with `*` were inferred from code structure, naming
> conventions, or contextual evidence where direct confirmation was not available
> in source artifacts. Statements marked with `**` could not be confirmed; treat
> as unknown until verified.

## Sources
- `SAIF.Business.View.Policy\clsPolicySecurity.vb`
